home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 4 / 004.d81 / dos part 8 < prev    next >
Text File  |  2022-08-26  |  3KB  |  174 lines

  1.         DOS & DON'TS - PART 8
  2.         ---------------------
  3.  
  4.  
  5.    Now that you know what wild cards
  6.  
  7. are, how do you use them?  The fol-
  8.  
  9. lowing paragraphs will show how vari-
  10.  
  11. ous commands work with wild cards:
  12.  
  13.  
  14.    LOAD, VERIFY, and OPEN in any of
  15.  
  16. their forms will select the first file
  17.  
  18. that matches their filename.  EXCEP-
  19.  
  20. TION:  If the filename is '*', these
  21.  
  22. commands will use the LAST FILE THAT
  23.  
  24. THE DISK ACCESSED!  If none was previ-
  25.  
  26. ously accessed (like if you just turn-
  27.  
  28. ed the disk drive or the 64 on), then
  29.  
  30. the first file on the disk is used
  31.  
  32. like you would normally expect.  If
  33.  
  34. you want to be SURE and get the first
  35.  
  36. file, use ':*' instead of '*'!
  37.  
  38.  
  39.    The Directory command can take a
  40.  
  41. filename following the '$' and a ':'.
  42.  
  43. The listing will include ONLY the
  44.  
  45. matching files.  For example:
  46.  
  47.  
  48.    @$:FILE ?
  49.    0 "MY OWN DISK    " MD 2A
  50.    3    "FILE 1"          SEQ
  51.    6    "FILE 2"          SEQ
  52.    5    "FILE 5"          SEQ
  53.    601 BLOCKS FREE.
  54.  
  55.  
  56. The Directory command also takes a
  57.  
  58. special wildcard:  '=' followed by a
  59.  
  60. 'P', 'S', 'U' or 'R' will cause only
  61.  
  62. PRG, SEQ, USR or REL files respective-
  63.  
  64. ly to be listed.  For example:
  65.  
  66.  
  67.  
  68.    @$:F*=P
  69.    0 "MY OWN DISK    " MD 2A
  70.    45   "FILE MAKER"      PRG
  71.    9    "FIRE 1"          PRG
  72.    12   "FILLER"          PRG
  73.    601 BLOCKS FREE.
  74.  
  75.  
  76.    The SCRATCH command scratches (de-
  77.  
  78. letes, or removes) ALL matching files.
  79.  
  80. That means that the DOS Wedge command
  81.  
  82. '@S:*' will erase ALL files from the
  83.  
  84. disk!  If that is what you want to do,
  85.  
  86. it is MUCH faster to use the NEW com-
  87.  
  88. mand without an ID to erase all files.
  89.  
  90. For example:  '@N:MY OWN DISK'.  After
  91.  
  92. using the SCRATCH command, the Disk
  93.  
  94. Status command will return an Error
  95.  
  96. Type 01, message 'FILES SCRATCHED'.
  97.  
  98. The Track number (the third part of
  99.  
  100. the Status message) will be the number
  101.  
  102. of files scratched.  For example:
  103.  
  104.  
  105.    @S:FILE ?
  106.    @
  107.    01, FILES SCRATCHED,03,00
  108.  
  109.  
  110.    The RENAME command does NOT use the
  111.  
  112. wild card characters.
  113.  
  114.  
  115.    The COPY command can accept wild
  116.  
  117. cards on both sides of the '='.  The
  118.  
  119. filename on the left (the destination)
  120.  
  121. MUST be '*' if wild cards are used in
  122.  
  123. the filename on the right.  This is
  124.  
  125. useful only with dual-drive units like
  126.  
  127. the CBM 4040 (with an IEEE interface)
  128.  
  129. or an MSD SuperDrive 2.  It causes all
  130.  
  131. the files that match the source file-
  132.  
  133. name to be copied with their names in-
  134.  
  135. tact.  For example:
  136.  
  137.  
  138.    @C1:*=0:??????
  139.  
  140.  
  141. with a dual-drive unit would cause all
  142.  
  143. the files except 'FILE MAKER' on our
  144.  
  145. sample disk to be copied to the disk
  146.  
  147. in drive 1, keeping their names on the
  148.  
  149. new disk.
  150.  
  151.  
  152.    Using the '*' quirk of the LOAD
  153.  
  154. command can be handy.  If you have a
  155.  
  156. program in memory that you just LOADed
  157.  
  158. from disk, and you SCRATCH it from the
  159.  
  160. disk and NEW it from memory, then de-
  161.  
  162. cide you want it back, you can IMMED-
  163.  
  164. IATELY type 'LOAD "*",8' ('/*' with
  165.  
  166. the Wedge), and the file will LOAD
  167.  
  168. back in, even though it was SCRATCHed!
  169.  
  170. You can then SAVE it as usual!
  171.  
  172.  
  173. ------------ end of article ----------
  174.